package cts.com.dbmanager;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cts.com.constants.CommonConstants;

public class NavigationPopulateServlet extends HttpServlet implements
		CommonConstants {

	private static final long serialVersionUID = -1632775811909981626L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		String value = (String) req.getParameter("text");
		String navigationlink = "";
		if (value.length() > 0) {
			if (MYACCOUNT.equalsIgnoreCase(value)) {
				navigationlink = "<a id=\"hyperlink\" href=" + PAGE_MYACCOUNT + ">MY ACCOUNT</a>" + "<br/>"
						+ "<a href=" + PAGE_MYACCOUNT + ">Your A/c</a>";
			} else if (TRANSFER.equalsIgnoreCase(value)) {
				navigationlink = "<a href=" + PAGE_MYACCOUNT + ">Same Bank ACCOUNT</a>" + "<br/>"
				+ "<a href=" + PAGE_MYACCOUNT + ">Other Bank</a>"; 
			}
		}
		resp.setContentType("text/html");
		resp.getWriter().write(navigationlink);
	}
}
